

function say() {
    alert("LC:342. 4的幂");
}
say();


var isPowerOfFour = function(n) {
    //2:44 - 59


    if(n == 1 || n == 4) {
        return true
    }

    if(n == 0) {
        return false
    }

    if(n % 4 != 0){
        return false
    }

    return isPowerOfFour(n / 4)

};


var test = isPowerOfFour(1)

console.log('342-',test)